﻿@{
    ViewBag.Title = "ViewPage1";
    Layout = "~/Views/Shared/BaseView.cshtml";
}
<script type="text/javascript">
    function showhiddendiv(obj) {
        $(".behiddened").toggle();
        if ($(obj).html().toString().indexOf("更多") >= 0) {
            $(obj).html("隐藏&lt;&lt;");
        } else {
            $(obj).html("更多&gt;&gt;");
        }
    }
</script>
<div style="position: relative">
</div>
@{
    Common.Web.Cookie cookie = new Common.Web.Cookie();
    int visiterId = Convert.ToInt32(cookie.GetCookie("LoginUserId"));
    BenefitHelper.DB.DBManager db = new BenefitHelper.DB.DBManager();
    if (BenefitHelper.Sys.VisitPrower.HasAdminPrower(visiterId, db))
    { 
    <div id="buttons">
        <span>
            <p>
                <a href="/Init" target="_blank" title="后台管理">后台管理</a>
            </p>
        </span>
    </div>
    }
    db.Dispose();
}
<dl id="xiangmu">
    <dt><span id="title2">@ViewBag.op.UName</span></dt>
    <dd>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" id="panzhongfenxi">
            <tr>
                <td id="curr_p">
                    <b class="panzhong"><a>盘中分析</a></b><b><a href="/AfterAnalysis/Index/@ViewBag.op.Id/@ViewBag.pdate">盘后分析</a></b>
                </td>
                <td>
                    <a href="/OperatorRealtimeTransaction/Index/@ViewBag.op.Id/@ViewBag.pdate">
                        <img src="/Content/images/icon_01.gif" />汇总信息</a>
                </td>
                <td class="selected">
                    <img src="/Content/images/icon_09.gif" />持仓分析
                </td>
                <td>
                    <a href="/ProfitAndLossDistribution/Index/@ViewBag.op.Id/@ViewBag.pdate">
                        <img src="/Content/images/icon_10.gif" />盈亏分布</a>
                </td>
                <td>
                    <a href="/TradeDetail/Index/@ViewBag.op.Id/@ViewBag.pdate">
                        <img src="/Content/images/icon_05.gif" />交易明细</a>
                </td>
            </tr>
        </table>
    </dd>
</dl>
<div id="bigDataBox">
    <span style="width: 50%;">数据统计时间：
        <input type="text" id="key" class="Wdate" onclick="WdatePicker()" name="key" value="@ViewBag.Hpdate"  /><span
            style="padding-left: 24px;"><span style="cursor: pointer;"><input type="button" value="查看"
                style="font-size: 9pt; width: 60px; height: 22px;" id="changedate" /></span></span></span>
    <div style="height: 15px; line-height: 15px;">
    </div>
    <table style="width: 100%; height: 300px;">
        <tr>
            <td style="width: 56%; vertical-align: top;">
                <div style="width: 100%; height: 320px;" id="showflash">
                </div>
            </td>
            <td style="width: 44%; vertical-align: top;">
                <table cellspacing="0" cellpadding="0" class="list" style="width: 100%;" id="timediv">
                    <tr>
                        <td class="title" style="text-align: left; padding-left: 10px;">
                        </td>
                        <td class="title" style="text-align: left; padding-left: 10px;">
                            值
                        </td>
                        <td class="title" style="text-align: left; padding-left: 10px;">
                            本周均值
                        </td>
                        <td class="title leftyes" style="text-align: right;">
                            近五日均值
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            平均持仓时间
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.change.AvgPostionTime
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.change.AvgPostionTime, ViewBag.prechange.AvgPostionTime))
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.changeweek.AvgPostionTime
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changeweek.AvgPostionTime, ViewBag.prechangeweek.AvgPostionTime))
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.changefiveday.AvgPostionTime
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changefiveday.AvgPostionTime, ViewBag.prechangefiveday.AvgPostionTime))
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            单笔收益
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.change.AvgBillBenefit)
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.change.AvgBillBenefit, ViewBag.prechange.AvgBillBenefit))
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.changeweek.AvgBillBenefit)
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changeweek.AvgBillBenefit, ViewBag.prechangeweek.AvgBillBenefit))
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @string.Format("{0:N2}", ViewBag.changefiveday.AvgBillBenefit)
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changefiveday.AvgBillBenefit, ViewBag.prechangefiveday.AvgBillBenefit))
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            资金利用率
                        </td>
                        @*<td style="text-align: right; cursor: pointer; background: url('/Content/images/tipbg.png') no-repeat right top">*@
                        <td style="text-align: right;">
                            @ViewBag.change.Utilization %
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.change.Utilization, ViewBag.prechange.Utilization))
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.changeweek.Utilization %
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changeweek.Utilization, ViewBag.prechangeweek.Utilization))
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.changefiveday.Utilization %
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changefiveday.Utilization, ViewBag.prechangefiveday.Utilization))
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            命中率
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.change.WinRate %
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.change.WinRate, ViewBag.prechange.WinRate))
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.changeweek.WinRate %
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changeweek.WinRate, ViewBag.prechangeweek.WinRate))
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.changefiveday.WinRate %
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changefiveday.WinRate, ViewBag.prechangefiveday.WinRate))
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            收益率
                        </td>
                        <td style="text-align: right;">
                            @Math.Round(ViewBag.change.Yield, 2) %
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.change.Yield, ViewBag.prechange.Yield))
                        </td>
                        <td style="text-align: right;">
                            @Math.Round(ViewBag.changeweek.Yield, 2) %
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changeweek.Yield, ViewBag.prechangeweek.Yield))
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @Math.Round(ViewBag.changefiveday.Yield, 2) %
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changefiveday.Yield, ViewBag.prechangefiveday.Yield))
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;" id="td11">
                            超出止损次数
                        </td>
                        <td style="text-align: right;" id="td12">
                            @ViewBag.change.OverStopLoss 
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.change.OverStopLoss, ViewBag.prechange.OverStopLoss))
                        </td>
                        <td style="text-align: right;" id="td13">
                            @ViewBag.changeweek.OverStopLoss 
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changeweek.OverStopLoss, ViewBag.prechangeweek.OverStopLoss))
                        </td>
                        <td style="text-align: right;" class="leftyes" id="td14">
                            @ViewBag.changeweek.OverStopLoss 
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changeweek.OverStopLoss, ViewBag.prechangeweek.OverStopLoss))
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            总盈利/总亏损
                        </td>
                        <td style="text-align: right;">
                            @Math.Round(ViewBag.change.SumWin / ViewBag.change.SumLost, 2)
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.change.SumWin / ViewBag.change.SumLost, ViewBag.prechange.SumWin / ViewBag.prechange.SumLost))
                        </td>
                        <td style="text-align: right;">
                            @if (ViewBag.changeweek.SumLost != 0)
                            { 
                                <span>@Math.Round(ViewBag.changeweek.SumWin / ViewBag.changeweek.SumLost, 2)</span>
                                @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changeweek.SumWin / ViewBag.changeweek.SumLost, ViewBag.prechangeweek.SumWin / ViewBag.prechangeweek.SumLost))
                            }
                            else
                            {
                                <span>0</span>
                            }
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @if (ViewBag.changefiveday.SumLost != 0)
                            { 
                                <span>@Math.Round(ViewBag.changefiveday.SumWin / ViewBag.changefiveday.SumLost, 2)</span>
                                @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changefiveday.SumWin / ViewBag.changefiveday.SumLost, ViewBag.prechangefiveday.SumWin / ViewBag.prechangefiveday.SumLost))

                            }
                            else
                            {
                                <span>0</span>
                            }
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;" class="bottomyes">
                            平进平出单
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @ViewBag.change.PingJinPing
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.change.PingJinPing, ViewBag.prechange.PingJinPing))
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @ViewBag.changeweek.PingJinPing
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changeweek.PingJinPing, ViewBag.prechangeweek.PingJinPing))
                        </td>
                        <td style="text-align: right;" class="leftyes bottomyes">
                            @ViewBag.changefiveday.PingJinPing
                            @MvcHtmlString.Create(BenefitHelper.Tools.Arrow.GetArrow(ViewBag.changefiveday.PingJinPing, ViewBag.prechangefiveday.PingJinPing))
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div style="width: 100%; height: 260px;" id="showflash3">
                </div>
            </td>
        </tr>
    </table>
    <div style="height: 5px; line-height: 5px;">
    </div>
    <div style="height: 5px; line-height: 5px;">
    </div>
    <div class="report-tip">
        <div class="report-tip-text">
            <div>
                <b>功能说明：</b></div>
            <div>
                平均持仓时间：通过这个参数，可以判断交易员平仓的效率以及当天平仓是否正常。<br />
                单笔收益：通过提高单笔的收益，也可以提升你的收益。不要盲目平仓。<br />
            </div>
        </div>
        <div class="report-tip-close">
            &nbsp;</div>
    </div>
</div>
@MvcHtmlString.Create(ViewBag.js)
<script type="text/javascript">
    ShouYiBiLVLine();
    BillCount();
    function showDetail() {
        if ($('#ad').attr('class') == "detailsold") {
            $("#ad").removeClass("detailsold").addClass("detailsoldclick");
        } else {
            $("#ad").removeClass("detailsoldclick").addClass("detailsold");
        }
        $(".detailslist").toggle();
    }
    function show22() {
        $("#timediv22").toggle();
    }
    function show23() {
        $("#timediv23").toggle();
    }
</script>
